package com.project.bean;

import java.time.LocalDate;

/**
 *
 */
public class SpeakBean {
    /** 编号*/
    private int id;
    /** 回帖的标题*/
    private String name;
    /** 评论的内容*/
    private String content;
    /** 评论的用户*/
    private UserBean user;
    /** 发布的时间*/
    private LocalDate date = LocalDate.now();
    /** 评论的主题*/
    private InvitationBane  in;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public InvitationBane getIn() {
        return in;
    }

    public void setIn(InvitationBane in) {
        this.in = in;
    }

    @Override
    public String toString() {
        return "SpeakBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", user=" + user +
                ", date=" + date +
                ", in=" + in +
                '}';
    }

    public SpeakBean() {
    }

    public SpeakBean(String name, String content, Integer userId, Integer inId) {
        this.name = name;
        this.user = new UserBean();
        user.setId(userId);
        this.content = content;
        this.in=new InvitationBane();
        in.setId(inId);
    }
}
